package com.link2room.ironhide.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by sss on 2016/11/9.
 */
@Entity
@Table(name = "l2r_group_baseinfo")
public class L2RGroupBaseinfo extends BaseEntity{
    private String name;
    private String usedName;
    private String address;
    private String telReception;
    private String telBooking;
    private String tel400;
    private String descript;
    private String groupTag;
    private String searchCode;
    private String payOption;

    @Basic
    @Column(name = "name", nullable = false, length = 64)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "used_name", nullable = true, length = 64)
    public String getUsedName() {
        return usedName;
    }

    public void setUsedName(String usedName) {
        this.usedName = usedName;
    }

    @Basic
    @Column(name = "address", nullable = true, length = 200)
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "tel_reception", nullable = true, length = 16)
    public String getTelReception() {
        return telReception;
    }

    public void setTelReception(String telReception) {
        this.telReception = telReception;
    }

    @Basic
    @Column(name = "tel_booking", nullable = true, length = 16)
    public String getTelBooking() {
        return telBooking;
    }

    public void setTelBooking(String telBooking) {
        this.telBooking = telBooking;
    }

    @Basic
    @Column(name = "tel_400", nullable = true, length = 16)
    public String getTel400() {
        return tel400;
    }

    public void setTel400(String tel400) {
        this.tel400 = tel400;
    }

    @Basic
    @Column(name = "descript", nullable = true, length = -1)
    public String getDescript() {
        return descript;
    }

    public void setDescript(String descript) {
        this.descript = descript;
    }

    @Basic
    @Column(name = "group_tag", nullable = true, length = 255)
    public String getGroupTag() {
        return groupTag;
    }

    public void setGroupTag(String groupTag) {
        this.groupTag = groupTag;
    }

    @Basic
    @Column(name = "search_code", nullable = true, length = 64)
    public String getSearchCode() {
        return searchCode;
    }

    public void setSearchCode(String searchCode) {
        this.searchCode = searchCode;
    }

    @Basic
    @Column(name = "pay_option")
    public String getPayOption() {
        return payOption;
    }

    public void setPayOption(String payOption) {
        this.payOption = payOption;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RGroupBaseinfo that = (L2RGroupBaseinfo) o;

        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (usedName != null ? !usedName.equals(that.usedName) : that.usedName != null) return false;
        if (address != null ? !address.equals(that.address) : that.address != null) return false;
        if (telReception != null ? !telReception.equals(that.telReception) : that.telReception != null) return false;
        if (telBooking != null ? !telBooking.equals(that.telBooking) : that.telBooking != null) return false;
        if (tel400 != null ? !tel400.equals(that.tel400) : that.tel400 != null) return false;
        if (descript != null ? !descript.equals(that.descript) : that.descript != null) return false;
        if (groupTag != null ? !groupTag.equals(that.groupTag) : that.groupTag != null) return false;
        if (searchCode != null ? !searchCode.equals(that.searchCode) : that.searchCode != null) return false;
        return payOption != null ? payOption.equals(that.payOption) : that.payOption == null;
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + (usedName != null ? usedName.hashCode() : 0);
        result = 31 * result + (address != null ? address.hashCode() : 0);
        result = 31 * result + (telReception != null ? telReception.hashCode() : 0);
        result = 31 * result + (telBooking != null ? telBooking.hashCode() : 0);
        result = 31 * result + (tel400 != null ? tel400.hashCode() : 0);
        result = 31 * result + (descript != null ? descript.hashCode() : 0);
        result = 31 * result + (groupTag != null ? groupTag.hashCode() : 0);
        result = 31 * result + (searchCode != null ? searchCode.hashCode() : 0);
        result = 31 * result + (payOption != null ? payOption.hashCode() : 0);
        return result;
    }
}
